package pl.wr.physics.units.planck.base;

import pl.wr.math.number.Fraction;
import pl.wr.physics.units.AbstractUnit;
import pl.wr.physics.units.SI.Prefix;
import pl.wr.physics.units.SI.derived.C;
import pl.wr.physics.units.planck.PlanckSIValues;

/**
 * Planck charge - Planck units
 * 
 * @version 1.0
 * @author wieslaw.rodak
 * 
 */
public final class Q extends AbstractUnit implements PlanckSIValues {

	public static final String symbol = "q(p)";

	/**
	 * planck charge - Q
	 * 
	 * @param value
	 *            in <code>int</code>
	 */
	public Q(int value) {
		this(Prefix.basic, value);
	}

	/**
	 * planck charge - Q
	 * 
	 * @param value
	 *            in <code>float</code>
	 */
	public Q(float value) {
		this(Prefix.basic, value);
	}

	/**
	 * planck charge - Q
	 * 
	 * @param value
	 *            in <code>Fraction</code>
	 */
	public Q(Fraction value) {
		this(Prefix.basic, value);
	}

	/**
	 * planck charge - Q
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>int</code>
	 */
	public Q(Prefix p, int value) {
		super(p, value, Q.class.getSimpleName());
	}

	/**
	 * planck charge - Q
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>float</code>
	 */
	public Q(Prefix p, float value) {
		super(p, value, Q.class.getSimpleName());
	}

	/**
	 * planck charge - Q
	 * 
	 * @param p
	 *            - prefix SI
	 * @param value
	 *            - value in <code>Fraction</code>
	 */
	public Q(Prefix p, Fraction value) {
		super(p, value, Q.class.getSimpleName());
	}

	/**
	 * This value multiply {@link pl.wr.physics.units.planck.PlanckSIValues#CHARGE}.
	 */
	@Override
	public C getSIValue() {
		return new C(Fraction.multiply(this.getValue(), PlanckSIValues.CHARGE.getValue()));
	}
}
